<?php header("Content-Type: application/rss+xml; charset=UTF-8");?>
<?php echo '<?xml version="1.0"  encoding="UTF-8"?>';?>
 <rss 
 	xmlns:dc="http://purl.org/dc/elements/1.1/" 
	xmlns:media="http://search.yahoo.com/mrss/" 
	version="2.0"
>
    <channel>
    <title><?php echo $title;?></title>
    <link><?php echo $title_url;?></link>
    <description>You2Play.com</description>
    <language>en-us</language>
    <image>
      <title>The image title goes here</title>
      <url><?php echo image_asset_url('default/you2play_logo.png','',array('width' => 250,'height' => 112));?></url>
      <link><?php echo $title_url;?></link>
    </image>
	<?php if(!empty($dataResult)) foreach($dataResult as $value):?>
		<item>
			<title><?php echo htmlspecialchars($value->title, ENT_QUOTES, 'UTF-8');?></title>
	      	<link><?php echo $value->link;?></link>
	      	<description><?php echo '<![CDATA['.$value->description.']]>';?></description>
			<?php if(!empty($value->thumbnail)):?>
		  	<media:thumbnail url="<?php echo $value->thumbnail;?>" height="75" width="75" />
			<?php endif;?>
			<media:keywords><?php echo '<![CDATA['.$value->tag.']]>';?></media:keywords>
		  	<pubDate><?php echo $value->pubDate;?></pubDate>
		  	<dc:creator>You2Play.com</dc:creator>
		</item>
	<?php endforeach;?>	
  </channel>
</rss>